package com.tingyuge.base.jdk.io.aio;

/**
 * @Created by xiaodao
 */
public class AioServer {

    private static int DEFAULT_PORT = 12345;
    private static AioServerHandler serverHandle;
    public volatile static long clientCount = 0;
    public static void start(){
        start(DEFAULT_PORT);
    }
    public static synchronized void start(int port){
        if(serverHandle!=null)
            return;
        serverHandle = new AioServerHandler(port);
        new Thread(serverHandle,"Server").start();
    }
    public static void main(String[] args){
        AioServer.start();
    }


}
